package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 采购订单详情表 实体bean
 */
@TableName("t_purchaseInfo")
public class PurchaseInfoBean {
    /** 采购订单详情Id */
    @TableId(value = "pk_purchaseInfoId",type = IdType.AUTO)
    private Integer pk_purchaseInfoId;
    /** 采购订单外键ID */
    @TableField("fk_purchaseOrderId")
    private Integer purchaseOrderId;
    /** 商品外键ID */
    @TableField("fk_stockId")
    private String stockId;
    /** 采购价 */
    @TableField("pi_price")
    private Integer price;
    /** 采购数量 */
    @TableField("pi_num")
    private Integer num;
    /** 采购订单实体 */
    @TableField(exist = false)
    private PurchaseOrderBean purchaseOrderBean;
    /** 商品实体 */
    @TableField(exist = false)
    private StockBean stockBean;

    public PurchaseInfoBean() {
    }

    public PurchaseInfoBean(Integer purchaseOrderId, String stockId, Integer price, Integer num) {
        this.purchaseOrderId = purchaseOrderId;
        this.stockId = stockId;
        this.price = price;
        this.num = num;
    }

    public Integer getPk_purchaseInfoId() {
        return pk_purchaseInfoId;
    }

    public void setPk_purchaseInfoId(Integer pk_purchaseInfoId) {
        this.pk_purchaseInfoId = pk_purchaseInfoId;
    }

    public Integer getPurchaseOrderId() {
        return purchaseOrderId;
    }

    public void setPurchaseOrderId(Integer purchaseOrderId) {
        this.purchaseOrderId = purchaseOrderId;
    }

    public String getStockId() {
        return stockId;
    }

    public void setStockId(String stockId) {
        this.stockId = stockId;
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public PurchaseOrderBean getPurchaseOrderBean() {
        return purchaseOrderBean;
    }

    public void setPurchaseOrderBean(PurchaseOrderBean purchaseOrderBean) {
        this.purchaseOrderBean = purchaseOrderBean;
    }

    public StockBean getStockBean() {
        return stockBean;
    }

    public void setStockBean(StockBean stockBean) {
        this.stockBean = stockBean;
    }

    @Override
    public String toString() {
        return "PurchaseInfoBean{" +
                "pk_purchaseInfoId=" + pk_purchaseInfoId +
                ", purchaseOrderId=" + purchaseOrderId +
                ", stockId='" + stockId + '\'' +
                ", price=" + price +
                ", num=" + num +
                ", purchaseOrderBean=" + purchaseOrderBean +
                ", stockBean=" + stockBean +
                '}'+'\n';
    }
}
